package com.bupt.greeddaotest.control;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.bupt.greeddaotest.dao.DaoMaster;
import com.bupt.greeddaotest.dao.UserDao;
import com.github.yuweiguocn.library.greendao.MigrationHelper;

/**
 * 数据库
 */

public class MySQLiteOpenHelper extends DaoMaster.OpenHelper {
    public MySQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        super.onUpgrade(db, oldVersion, newVersion);
        MigrationHelper.migrate(db,UserDao.class);//版本升级，暂时不会用
    }
}
